<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="utf-8">
    <title id="title">Title</title>
</head>
<script language="JavaScript">
       function sum(n1, n2){
            alert(n1 + n2);
       }

       function callAndroid(){
         android.showToast('JS 唤起Android Toast')
       }
</script>
<body>
WebView

<button type="button" id="button1" onclick="callAndroid()">唤起Android toast</button>

</body>
</html>